rm(list=ls(all=TRUE))

data_summary<-vector('list',100)

i = 0
i_d = 0
for (k in 1:340) {
dataset_name <- sprintf("product_files/data_product_%s.csv", k)
if (file.exists(dataset_name)) {
i = i + 1
dataset = read.csv(dataset_name, header = TRUE)
data_summary[[i]] = dataset
if (i == 100) {
i_d = i_d + 1
data_summary_name <- sprintf("data_summary_full_%s.RData", i_d)  
save(file = data_summary_name, data_summary)  
data_summary<-vector('list',100)
i = 0
}
}
}

data_summary_name <- sprintf("data_summary_full_%s.RData", i_d + 1)  
save(file = data_summary_name, data_summary)  

